#coding=utf-8
from core.error import ServiceError
from .const import CONFERENCE_MANAGER_PERM


def manager_perm_valid(session,perm_id):
    if not session or not isinstance(session,dict):
        raise ServiceError("need permission",can_out_put=True)
    if int(perm_id) not in session.get(CONFERENCE_MANAGER_PERM):
        raise ServiceError("need permission", can_out_put=True)
